
package com.thor.palmmall.dao.unifyversion;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.unifyversion.UIpapk;

public class UIpapkConverter implements Converter<PUIpapk, UIpapk> {

  @Override
  public UIpapk convert(PUIpapk source) {
    if (source == null)
      return null;

    UIpapk target = new UIpapk();
    target.inject(source);
    target.setForceUpdate(source.isForceUpdate());
    target.setType(source.getType());
    target.setUrl(source.getUrl());
    target.setVersion(source.getVersion());
    target.setBackgroundUrl(source.getBackgroundUrl());
    target.setDesc(source.getVersionnote());
    target.setPicUrl(source.getPicUrl());
    target.setLogoUrl(source.getLogoUrl());
    target.setHeadText(source.getHeadText());
    target.setFootText(source.getFootText());
    target.setNeedUpdate(source.isNeedUpdate());
    target.setAuthCode(source.getAuthCode());
    target.setApiKey(source.getApiKey());
    target.setAppKey(source.getAppKey());
    target.setFineReportUrl(source.getFineReportUrl());
    target.setContractCheckUrl(source.getContractCheckUrl());
    target.setDebug(source.isDebug());

    return target;
  }

}
